{% extends "base.html" %}
{% load markup %}

{% block title %}Blog Results{% endblock %}

{% block primary-content %}
<span class="breadcrumbs"><a href="{% url index %}" title="Home">Home</a> &raquo; <a href="{% url blog %}" title="Blog">Blog</a> &raquo; Archives</span>
{# <h2>Posts{% if query_issue or query_rep %} about {{ query_issue }}{% if query_issue and query_rep %} and {% endif %}{{ query_rep }}{% endif %}{% if query_month or query_year %} from {{ query_month }}{% if query_month and query_year %}, {% endif %}{{ query_year }}{% endif %}</h2> #}
<h2>Blog Posts from {{ query_month|date:"F Y" }}</h2>
{% for post in posts.object_list %}
<h3 class="blog-teaser"><a href="{% url blog_post post.id %}">{{ post }}</a></h3>
<div class="blog-main clearfix">
	<small class="date-posted">Posted {{ post.pub_date|date }} by {{ post.get_author }}</small>
	{{ post.body|markdown|truncatewords_html:110 }}    
	<!--<p class="read-more"><a href="{% url blog_post post.id %}">Continue Reading &raquo;</a></p>-->
</div>
<div class="blog-aside">
	<dl class="postmetadata">
		<dt>Issues</dt>
		<dd>{% for issue in post.issues.active %}<a href="{% url issues %}#{{ issue.slug }}">{{ issue }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</dd>
		<dt>Reps</dt>
		<dd>{% for rep in post.reps.active %}{{ rep }}{% if not forloop.last %}, {% endif %}{% endfor %}</dd>
	</dl>
</div>
{% endfor %}
{% if posts.has_next or posts.has_previous %}
<div class="pager clear-left">
  {% if posts.has_next %}
  <div class="float-left"><a href="?page={{ posts.next_page_number }}">&laquo; Older Entries</a></div>
  {% endif %}
  {% if posts.has_previous %}
  <div class="float-right"><a href="?page={{ posts.previous_page_number }}">Newer Entries &raquo;</a></div>
  {% endif %}
</div>
{% endif %}{% endblock %}

{% block secondary-content %}
  {% include "snippets/signup_or_info.html" %}
  {% include "news/snippets/blog_archives.html" %}
  {% include "snippets/reports_and_news.html" %}
{% endblock %}

